<include file="Common/header" />
<!-- 导航栏 -->
{$bread_crumb}
<!-- 导航栏 -->
<div class="page-container">
    <form id="form1" action="{:U(CONTROLLER_NAME.'/update')}" method="post" class="form form-horizontal" enctype="multipart/form-data" onsubmit="return submit_before()">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>名称：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" placeholder="" id="" name="e_varchar" value="{$data.e_varchar}" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>价钱：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" style="width:20%" placeholder="" id="" name="e_decimal"  value="{$data.e_decimal}" > 元
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>视频链接：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" placeholder="" id="" name="href" value="{$data.href}" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>外站链接：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" placeholder="" id="" name="out_href" value="{$data.out_href}" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属分类：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                    <span class='select-box'>
                            <select id='e_select' name='e_select' class='select'>
                                <option value="null">请选择分类</option>
                                <foreach name="category" item="vo">
                                    <option value="{$vo.id}" <if condition="$vo.id eq $data[e_select]">selected="selected"</if>>{$vo.name}</option>
                                </foreach>   
                            </select>
                        </span>
            </div>
        </div>

        <!--订单自动填入信息-->
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">订单类型：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                    <span class='select-box'>
                        <select id='order_type' name='order_type' class='select'>
                            <option value="null" <if condition="$data.order_type eq 'null'">selected="selected"</if>>请选择分类</option>
                            <option value="视频" <if condition="$data.order_type eq '视频'">selected="selected"</if>>视频</option>
                            <option value="音频" <if condition="$data.order_type eq '音频'">selected="selected"</if>>音频</option>
                            <option value="画师" <if condition="$data.order_type eq '画师'">selected="selected"</if>>画师</option>
                        </select>
                    </span>
            </div>
        </div>


        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">制作类型：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                    <span class='select-box'>
                        <select id='making_type' name='making_type' class='select'>
                            <option value="null" <if condition="$data.making_type eq 'null'">selected="selected"</if>>请选择分类</option>
                            <option value="个人类型" <if condition="$data.making_type eq '个人类型'">selected="selected"</if>>个人类型</option>
                            <option value="企业视频" <if condition="$data.making_type eq '企业视频'">selected="selected"</if>>企业视频</option>
                            <option value="工作室、团队视频" <if condition="$data.making_type eq '工作室、团队视频'">selected="selected"</if>>工作室、团队视频</option>  
                        </select>
                    </span>
            </div>
        </div>
        
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">视频类型：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                    <span class='select-box'>
                        <select id='video_type' name='video_type' class='select'>
                            <option value="null" <if condition="$data.making_type eq 'null'">selected="selected"</if>>请选择分类</option>
                            <option value="PV(MV)" <if condition="$data.making_type eq 'PV(MV)'">selected="selected"</if>>PV(MV)</option>
                            <option value="定制动画" <if condition="$data.making_type eq '定制动画'">selected="selected"</if>>定制动画</option>
                            <option value="其他动画" <if condition="$data.making_type eq '其他动画'">selected="selected"</if>>其他动画</option>   
                        </select>
                    </span>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">PV类型：</label>
            <div class="formControls col-xs-8 col-sm-9"> 
                    <span class='select-box'>
                            <select id='pv_type' name='pv_type' class='select'>
                                <option value="null" <if condition="$data.making_type eq 'null'">selected="selected"</if>>请选择分类</option>
                                <option value="一图流" <if condition="$data.making_type eq '一图流'">selected="selected"</if>>一图流</option>
                                <option value="多图流" <if condition="$data.making_type eq '多图流'">selected="selected"</if>>多图流</option>
                                <option value="剪辑" <if condition="$data.making_type eq '剪辑'">selected="selected"</if>>剪辑</option>
                                <option value="定制类" <if condition="$data.making_type eq '定制类'">selected="selected"</if>>定制类</option>   
                            </select>
                        </span>
            </div>
        </div>
        <!--订单自动填入信息-->


        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">是否热门：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="check-box">
                    <input type="checkbox" name="e_is" value="1" <if condition="$data[e_select] eq '1'">checked</if> >
                    <label for="checkbox-1">&nbsp;</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">简介：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" name="e_min_text">{$data.e_min_text}</textarea>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">商品详情：</label>
            <input type="hidden" name="e_text" id="e_text">
            <div class="formControls col-xs-8 col-sm-9"> 
                <script id="editor" type="text/plain" style="width:100%;height:400px;"></script> 
            </div>
        </div>
        <if condition="$data['e_image']">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">图片：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <img width="300" class="thumbnail" src="{$data['e_image']}">
                </div>
            </div>
        </if>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">新图片/文件：</label>
            <div class="formControls col-xs-8 col-sm-9"> <span class="btn-upload form-group">
                <input class="input-text upload-url" type="text" name="uploadfile" readonly>
                <a href="javascript:void();" class="btn btn-primary radius upload-btn"><i class="Hui-iconfont">&#xe642;</i> 浏览</a>
                <!-- 上传图片的name 不可与数据库字段名一致 -->
                <input type="file" multiple name="image" class="input-file">
                </span>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})"  class="input-text Wdate" style="width:180px;" id="datetime" name="e_datetime" value="{$data.e_datetime}">
            </div>
        </div>
       <!--  <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">一行多个（可不需要）：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val1" name="val1" value="{$data['val1']}" >
                MM
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val2" name="val2" value="{$data['val2']}">
                MM
                <input type="text" class="input-text" style=" width:25%" placeholder="输入长度" id="val3" name="val3" value="{$data['val3']}">
                MM
        </div> -->
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" id="info_now" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
                <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
        
    </form>
</div>
<include file="Common/footer" />
<script type="text/javascript">
    /*checkbox*/
    $(function(){
        var ue = UE.getEditor('editor');
            $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });/*{$data['e_text']}
        ue.ready(function() {//编辑器初始化完成再赋值  
            ue.setContent('555555');  //赋值给UEditor  
        });*/
        ue.addListener('ready', function (editor) {
            ue.setContent('{$data['e_text']|htmlspecialchars_decode}');
        });
    });
    /*表单提交之前的操作，主要针对一些数据类型*/
    function submit_before() {
        $('#e_text').val(UE.getEditor('editor').getContent());
    }
    
    </script> 